#ifndef __UART_SEND_APP_H__
#define __UART_SEND_APP_H__

#include "sys_bsp.h"

#define UART_SEND_HEAD_DATA          0xA5    /* Frame header data */
#define UART_SEND_TIME_OUT           1000    /* Timeout value in milliseconds */
#define UART_TASK_STACK_SIZE         512     /* Task stack size in bytes */
#define UART_STORAGE_TASK_PRIORITY   (osPriority_t) osPriorityNormal

extern osThreadId_t                   uart_send_TaskHandle;
extern const osThreadAttr_t           uart_send_Task_attributes;
void uart_send_Task(void *argument);

/*
 * Development Board: STM32F407VET6
 * 
 * UART Configuration:
 * TX: PA9
 * RX: PA10
 * 
 * UART Baud Rate: 115200
 * 
 */

#pragma pack(1)  /* Start byte alignment */
typedef struct {
    uint8_t head;                   /* Frame header */
    float   adc_data[16];           /* ADC data field */
    uint8_t check_bit;              /* XOR checksum */
} message_t;
#pragma pack()   /* Restore default alignment */

#endif
